Instrument Operator: Instrument Line Shapes

using Pkg
using Plots

Add packages:

Pkg.add(url="https://github.com/RadiativeTransfer/Architectures.jl")
Pkg.add(url="https://github.com/RadiativeTransfer/Absorption.jl")
push!(LOAD_PATH,"./src/")

using Absorption
using InstrumentOperator
using Architectures

Load HITRAN data and CO2 cross sections

hitran_data = read_hitran(artifact("CO2"), mol=2, iso=1, ν_min=6000, ν_max=6400)
line_co2 = make_hitran_model(hitran_data, Voigt(), architecture=CPU())
Absorption.HitranModel
  hitran: Absorption.HitranTable{Float64}
  broadening: Absorption.Voigt Absorption.Voigt()
  wing_cutoff: Int64 40
  vmr: Int64 0
  CEF: Absorption.HumlicekWeidemann32SDErrorFunction Absorption.HumlicekWeidemann32SDErrorFunction()
  architecture: Architectures.CPU Architectures.CPU()

Compute a high resolution transmission spectrum

Δν = 0.001
ν = 6275:Δν:6400;
σ_co2   = absorption_cross_section(line_co2, ν, 200.0     , 296.0);

Transmission through a typical atmosphere

T = exp.(-8e21*σ_co2)
125001-element Vector{Float64}:
 0.9999871228367487
 0.9999870946404071
 0.9999870602009509
 0.9999870191638706
 0.9999869711361405
 0.9999869156914297
 0.9999868523802211
 0.9999867807460905
 0.9999867003488417
 0.9999866107971028
 ⋮
 0.9999879513816976
 0.9999880240136918
 0.9999880954431577
 0.9999881656984451
 0.9999882348069521
 0.999988302795173
 0.9999883696887425
 0.9999884355124757
 0.9999885002904071

plot high resolution transmission

plot(ν, T, lw=2)

Define the instrument kernel

x = -8:Δν:8
-8.0:0.001:8.0

Create a kernel at a center wavenumber of 6300cm⁻¹

FTS = FTSInstrument(5.0, 7.9e-3, 0.0)
FTSkernel = create_instrument_kernel(FTS, x,6300.0)
FTS_instr = FixedKernelInstrument(FTSkernel, collect(6280:0.01:6380))
FixedKernelInstrument{Float64}([1.2613918876301216e-7, 1.456759079752696e-7, 1.6507381735542912e-7, 1.843136953178469e-7, 2.033764713603739e-7, 2.2224324496506606e-7, 2.4089530433337396e-7, 2.593141449432896e-7, 2.774814879031071e-7, 2.953792980902944e-7  …  -2.8437012281149485e-7, -2.278146705270525e-7, -1.774080127992417e-7, -1.3319835014547875e-7, -9.522775629546357e-8, -6.353213821165809e-8, -3.8141202201896936e-8, -1.907842615920391e-8, -6.361037954455851e-9, -5.421010862427522e-20], [6280.0, 6280.01, 6280.02, 6280.03, 6280.04, 6280.05, 6280.06, 6280.07, 6280.08, 6280.09  …  6379.91, 6379.92, 6379.93, 6379.94, 6379.95, 6379.96, 6379.97, 6379.98, 6379.99, 6380.0])

Convolve with instrument kernel

T_conv = conv_spectra(FTS_instr, ν, T);

overplot convolved transmission:

plot!(FTS_instr.ν_out, T_conv)

This page was generated using Literate.jl.